using System;
using System.Collections.Generic;
using System.Text;
using GameFramework;
using GameEngine;

namespace Projet_X0
{
    class ProjectileForm : Form
    {
        public ProjectileForm(Projectile owner)
            : base(owner, new ProjectileMesh())
        {
        }

        public override BoundingBox getBoundingBox()
        {
            Vector2D position = ((Projectile)GetOwner()).GetPosition().GetPos();

            return new BoundingBox(
                new Vector2D(
                    position.GetX() - ((ProjectileMesh)GetMesh()).GetHeight() / 2 + 5,
                    position.GetY() - ((ProjectileMesh)GetMesh()).GetWidth() / 2 + 5), 
                new Vector2D(
                    position.GetX() + ((ProjectileMesh)GetMesh()).GetHeight() / 2 - 5,
                    position.GetY() + ((ProjectileMesh)GetMesh()).GetWidth() / 2 - 5));
        }
    }
}
